package com.itheima.method;

public class TestMethod {
    public static void main(String[] args) {
//        eat();
//        sleep();
//        method();
//        method(60);
//        print(10,20);
        int max = getMax(12, 78);
        System.out.println(max);
    }

    private static int getMax(int i, int i1) {
        if (i > i1){
            return  i;
        }else {
            return  i1;
        }
    }

    private static void print(int i, int i1) {
        System.out.println("输出"+i+"到"+i1+"之间的奇数:");
        for(int n = i; n <= i1; n++){
            if(n % 2 != 0){
                System.out.println(n);
            }
        }
    }

    private static void method(int i) {
        if (i % 2 == 0) {
            System.out.println("该数是偶数");
        }else {
            System.out.println("该数是奇数");
        }
    }

    private static void sleep() {
        System.out.println("睡觉");
    }

    private static void eat() {
        System.out.println("吃饭");
    }

    public  static  void method(){
        int num = 11;
        if (num % 2 == 0){
            System.out.println("偶数");
        }else{
            System.out.println("奇数");
        }
    }

}
